// This file is part of OpenTSDB.
// Copyright (C) 2015  The OpenTSDB Authors.
// Copyright (C) 2017 TeleDB Development Group
//
// This program is free software: you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 2.1 of the License, or (at your
// option) any later version.  This program is distributed in the hope that it
// will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
// General Public License for more details.  You should have received a copy
// of the GNU Lesser General Public License along with this program.  If not,
// see <http://www.gnu.org/licenses/>.
package net.opentsdb.query.filter.value;

/**
 * A filter that lets the user list one or more explicit strings that should
 * be included in a result set for aggregation. 
 * @since 2.2
 */
public  class TagVGreatEqualFilter extends TagValueFilterBase {

  /** Name of this filter */
  final public static String FILTER_NAME = "ge";

  public TagVGreatEqualFilter(final String tagk, final String filter) {
    this(tagk, filter, false);
  }

  /**
   * A ctor that allows enabling case insensitivity
   * @param tagk The tag key to associate with this filter
   * @param filter The filter to match on
   * @param case_insensitive Whether or not to match on case
   * @throws IllegalArgumentException if the tagk or filter were empty or null
   */
  public TagVGreatEqualFilter(final String tagk, final String filter,
                              final boolean case_insensitive) {
    super(tagk, filter,case_insensitive);
  }

  @Override
  public String getType() {
    return FILTER_NAME;
  }
  
  /** @return a string describing the filter */
  @Override
  public String description() {
    return "filter tsdb-value great than one value.";
  }
  
  /** @return a list of examples showing how to use the filter */
  @Override
  public String examples() {
    return "{value=gt(100)}";
  }
}
